<?php

namespace App\Caches;

use App\Services\IpToolService;

class IpToolCache extends CacheBase
{
    /**
     * 缓存前缀
     * @var string
     */
    protected $prefix = 'IpTool';

    /**
     * 读取真实数据，此接口只能由 remember 来回调
     * @param string|array $keys 检索key
     * @return string|array|integer
     */
    protected function getReal($ip = '')
    {
        return IpToolService::getInstance()->get($ip);
    }
}
